<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<title>index</title>
		<meta name="referrer" content="never" />
		<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">
		<link rel="stylesheet" href="../../../../css/mui.min.css">
		<link rel="stylesheet" href="../../static/components/components.css" />
		<link rel="stylesheet" href="../../static/css/common.css">
		<style>
			.mui-bar-nav ~ .mui-content .mui-pull-top-pocket{
				top:180px !important;
			}
			.label{
				width: 18vw;
			}
			.item-title{
			width: 20vw;
			}
			.list-head{
				width: 94vw;
				margin-left: 3vw;
				background-color: #fff;
				padding: 10px;
				margin-bottom: 10px;
			}
			.myheigth {
				height: 9vw;
			}
			.list button{
				margin: 0 !important;
				padding: 0 4vw !important;
			}
			.m-10{
				margin-top: 10px;
			}
			table{
				border-collapse:collapse;
			}
			th,td{
				border: 1px solid black;
				padding: 10px 10px;
			}
			thead>tr{
				background-color: #0088C9;
			}
			tbody>tr{
				background-color: #EEF1EE;
			}
			tbody>tr:hover{
				background-color: #F4F6F4;
			}
		</style>
	</head>

	<body>

		<header class="mui-bar mui-bar-nav mui-bar-nav-bg">
			<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
			<h1 id="title" class="mui-title">安全设施检查记录</h1>
		</header>
		<div class="mui-content" id="content" v-cloak>
			<!-- <div style="position: sticky;background: #efeff4;top: 44px;z-index: 11;" class="top">
				<transition name="fade">
					<div class="drop-menulist" v-if="showMenu">
						<div @click="menuClick(item)" v-for="(item,index) in menuList" :key="index">
							{{item.name}}
						</div>
					</div>
				</transition>
				<div class="search-model" style="width:96vw">
					<div class="mui-input-row mui-search">
						<input type="search" class="mui-input-clear" style="background-color: #fff;" placeholder="请输入关键字信息">
					</div>
				</div>
			</div> -->
			<div class="flex-between list-head">
				<div class="flex-row" style="font-weight: bold;">
					<div class="icon"></div>
					检查信息
				</div>
			</div>
			<div class="list-head">
				<div class="flex-between" style="margin-top: 15px;">
					<div class="mr-5">检查时间：{{safeCheck.checkTime}}</div>
				</div>
				<div class="flex-between" style="margin-top: 15px;">
					<div class="form_label">检查人：{{checkPerson}}</div>
				</div>
				<div class="flex-row" style="margin-top: 15px;">
					<div class="form_label">检查区域：</div>
					<input v-model="safeCheck.checkArea" placeholder="请输入检查区域" maxlength="60" class="itme-content" :disabled="disabled"></input>
				</div>
			</div>
			<hr size="1" class="hr-line" />

			<div class="list-head">
				<div>附件</div>
				<button class="submit_btn" @tap="upload">上传</button>
				<hr size="1" class="hr-line" />
				<div v-if="fileIds.length>0">
					<div style="margin-bottom: 1vh;" v-for="(item,index) in filesList" class="flex-row">
						<div v-if="filesList.length>0" style="width: 100vw;" class="flex-between">
							<div class="ip-text">
								{{item.fileName}}
							</div>
							<div class="flex-row">
								<button v-if="!disabled" style="background: red;color: white;border: 0;width: 10vw;" class="cancel_btn" @tap="delDown(item)">删除</button>
								<button style="width: 10vw;" class="submit_btn" @tap="downLoad(item)">下载</button>
							</div>
						</div>

					</div>
				</div>
				<div v-else style="text-align: center;">
					暂无数据
				</div>
			</div>
			<hr size="1" class="hr-line" />
			<div id="scroll">
				<div class="list" id="list">
					<ul v-for="(item,index) in safeCheck.checkItems" class="mui-table-view">
						<li class="mui-table-view-cell mui-collapse">
							<a style="padding: 3vh 3vw;" class="mui-navigate-right" href="#">
								<div style="display: inline-block;" class="icon"></div><span v-if="item.isAdd" style="display: inline-block;vertical-align: top;">{{item.checkItemContent}}</span>
								<span style="display: inline-block;vertical-align: top;">
									<div v-if="!item.isAdd" class="flex-between">
										<input @tap.stop v-model="item.checkItemContent" type="" name="" id="" value="" />
										<button @tap.stop style="background: red;color: white;" @tap="deleteCheckProject(index)" class="submit_btn">删除</button>
									</div>
								</span>
							</a>
							<div style="width: 100vw;padding-left: 10vw;" class="mui-collapse-content">
								<div style="padding-right:10px;">
									<div style="color: red;" v-if="!disabled" class="flex-between">
										执行情况已完成请勾选是，否则勾选否
									</div>
									<div v-for="(items,indexs) in item.checkItemNotes">
										<div class="flex-between m-10">
											{{items.checkItemContent}}
											<div v-for="(v,i) in checkResultTypeList" class="flex-row">
												{{v.itemText}}<input v-model="items.checkItemResult" :disabled="disabled" :value="v.itemValue" style="width: 18px;margin-right: 5px;"
												 type="radio" id="">
												<!-- 否 <input @change="yesNoChange" @change="changeCheck" v-model="formData.isAmbientNormal" value="0" style="width: 18px;margin-right: 5px;"
												 type="radio" id=""> -->
											</div>
										</div>
										<div class="flex-row">
											<div style="width: 35vw;margin-top: 10px;">备注</div>
											<input :disabled="disabled" maxlength="600" v-model="items.remark">
										</div>
										<div class="flex-row">
											<div style="width: 35vw;margin-top: 10px;">消除人（关闭人）</div>
											<input disabled v-model="items.itemSolveStaffName">
										</div> 
										<div class="flex-row">
											<span style="color: red;" v-if="items.checkItemResult == 0">*</span>
											<div style="width: 35vw;margin-top: 10px;">发现问题记录</div>
											<input :disabled="disabled" maxlength="60" v-model="items.problemLog">
										</div>
										<div class="flex-row">
											<div style="width: 100vw;" class="flex-between">
												<button v-if="items.isAdd" @tap="addCheckContent(index,indexs)" class="submit_btn">新增内容</button>
												<button v-if="items.addOrDelete" style="background: red;color: white;" @tap="deleteCheckContent(index,indexs)"
												 class="submit_btn">删除</button>
											</div>
										</div>
										<hr size="1" style="color: #999;border-style: dashed; widows: 250px;" />
									</div>

									<!-- <div class="flex-between ">
										<div class="flex-row">
											<input type="checkbox" v-model="changeShift.boosterStationDevicePatrolArr" value="3">
											<div>全面巡视</div>
										</div>
										<div class="flex-row">
											<input type="checkbox" v-model="changeShift.boosterStationDevicePatrolArr" value="4">
											<div>熄灯巡视</div>
										</div>
									</div> -->
								</div>
								<!-- <div class="mt-10" style="position: relative;">
									<div>备注</div>
									<textarea :disabled="!isEdit" v-model="changeShift.boosterStationRemarks" maxlength="300">
								</textarea>
									<div class="area_num">已输入{{changeShift.boosterStationRemarks.length}}字/300字</div>
								</div> -->
						</li>
					</ul>
					<div v-if="workStatus==20" style="display: flex;justify-content: center;">
						<button class="submit_btn" @tap="addCheckProject" type="button">新增项目</button>
					</div>
					<!-- <div class="flex-row">
						<span class="label">结论</span>
						<textarea :disabled="disabled" style="width: 70vw;" v-model="baseForm.dtcResult" placeholder="请输入结论" v-model="elseDesc"></textarea>
					</div>
					<div class="flex-row">
						<span class="label">备注</span>
						<textarea :disabled="disabled" style="width: 70vw;" v-model="baseForm.dtcRemark" placeholder="请输入备注" v-model="elseDesc"></textarea>
					</div> -->
				</div>
			</div>
			<!-- 退回通过弹窗 -->
			<div class="popup-bg" v-if="isApprove">
				<div style="padding: 15px 15px 0px" class="add-box" @click@tap.stop="clickStop">
					<div style="height: 5vh;" class="flex-row m-10">
						<div style="width: 70vw;font-size: 17px;">隐患描述
						</div>
					</div>
					<div style="max-height: 30vw;overflow: auto;">
						<div v-for="item in questionArrary">
							{{item.name}}
						</div>
						<div style="text-align: center;" v-if="questionArrary.length==0">
							暂无数据
						</div>
					</div>
					<hr v-if="showCheck" size="1" style="color: #999;border-style: dashed; widows: 250px;" />
					<div v-if="showCheck" style="height: 5vh;" class="flex-row m-10">
						<div style="width: 70vw;font-size: 17px;">选择切换审批人
						</div>
					</div>
					<div v-if="showCheck" class="flex-row m-10">
						<div class="pop-label">审批人</div>
						<personselect :issingle="false" ref="personselect"></personselect>
					</div>
					<hr v-if="showDes" size="1" style="color: #999;border-style: dashed; widows: 250px;" />
					<div v-if="showDes" style="height: 5vh;" class="flex-row m-10">
						<div style="width: 70vw;font-size: 17px;">意见描述
						</div>
					</div>
					<div v-if="showDes" class="flex-row m-10">
						<div class="pop-label">意见描述</div>
						<textarea style="width: 50vw;" v-model="submitSwitch.desc" placeholder="请输入意见描述" maxlength="600" name="" id="">
						</textarea>
					</div>
					<hr size="1" style="color: #999;border-style: dashed; widows: 250px;" />
					<div class="pop-bottom">
						<div @tap="submitForm">提交</div>
						<div class="color-red" @tap="isApprove=false">取消</div>
					</div>
				</div>
			</div>
			<div class="popup-bg" v-if="showAdd">
				<div style="padding: 15px 15px 0px" class="add-box" @click@tap.stop="clickStop">
					<div style="height: 5vh;" class="flex-row m-10">
						<div style="width: 70vw;font-size: 17px;">设备历史
						</div>
					</div>
					<div style="max-height: 50vh;overflow: auto;padding-right: 10px;">
						<div id="">
							<table border="" cellspacing="" cellpadding="">
								<thead>
									<tr>
										<th style="width: 10vw;">
											<input type="checkbox" v-model="checked" @change="changeAllChecked()" />
										</th>
										<th style="width: 30vw;">间隔</th>
										<th style="width: 50vw;">设备</th>
									</tr>
								</thead>
								<tbody id="ch">
									<tr v-for="item in collectionList">
										<td>
											<input :value="item" type="checkbox" v-model="checkedNames" /></td>
										<td>{{item.bay}}</td>
										<td>{{item.deviceName}}</td>
									</tr>
								</tbody>
							</table>
						</div>
					</div>
					<div class="pop-bottom">
						<div @tap="addTo()">添加到当日检测记录</div>
						<div class="color-red" @tap="clearDefectInfo">取消</div>
					</div>
				</div>
			</div>
			<div class="flex-between list-head">
				<div class="flex-row" style="font-weight: bold;">
					<div class="icon"></div>
					流程日志
				</div>
			</div>
			<processlog :processlogid='workId'></processlog>
			<div style="height: 60px;">
			</div>
			<div class="flex-between fixed-bottom">
				<button v-if="workStatus==20" @tap="save" class="submit_btn">保存</button>
				<button v-if="workStatus>20" @tap="sendBack" class="cancel_btn">
					退回
				</button>
				<button v-if="workStatus>20" @tap="pass" class="submit_btn">通过</button>
				<button v-if="workStatus==20" @tap="submit" class="submit_btn">提交</button>
				<button @click="goBack" class="cancel_btn">
					返回
				</button>
			</div>
		</div>
		<script src="../../../../js/mui.min.js"></script>
		<script src="../../../../js/vue.js"></script>
		<script src="../../static/js/neiosCommon.js"></script>
		<!--公共js页面必需-->
		<script src="../../static/components/personSelect.js"></script>
		<!--人员查询组件-->
		<script type="text/javascript" src="../../static/js/neiosRequst.js"></script>
		<script type="text/javascript" src="../../../../js/jquery-3.2.1.min.js"></script>
		<script src="../../static/components/processLog.js"></script>
		<!--流程日志-->
		<script src="./list.js"></script>
		<script src="../../static/js/upLoadHelper.js"></script>
	</body>

</html>
